﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace J.StatusRepository
{
    public interface IRepository<T> where T : class,new()
    {
        Task<int> AddAsync(T entity);
        Task<int> DeleteAsync(int id);
        Task<int> DeleteRangeAsync(List<T> deleteList);
        Task<int> UpdateAsync(T entity);
        Task<T> GetModelAsync(int id);
        Task<List<T>> GetAllAsync();
        Task<List<T>> GetAllAsync(Expression<Func<T, bool>> expres);
    }
}
